package com.xinyi.reactivemvvm.basic.activity;

import androidx.databinding.DataBindingUtil;
import androidx.databinding.ViewDataBinding;

import com.xinyi.basic.base.activity.BaseActivity;

/**
 * @author 杨耿雷
 * @date 2024/9/25 12:02
 * @description Activity ViewBinding基类
 */
public abstract class BaseViewBindingActivity<VDB extends ViewDataBinding> extends BaseActivity {

    protected VDB binding;

    @Override
    public void setContentView() {
        binding = DataBindingUtil.setContentView(this, initLayoutId());
        initObserveUI();
    }

    /**
     * 初始化UI观察
     */
    protected void initObserveUI() { }
}
